home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Magazine / Morphos / GCC / ppc-amigaos / include / mgl / log.h < prev    next >
C/C++ Source or Header  |  2000-01-22  |  1KB  |  53 lines

  1. /*
  2.  * $Id: log.h,v 1.2 2000/01/16 20:47:12 hfrieden Exp $
  3.  *
  4.  * $Author: hfrieden $
  5.  *
  6.  * $Date: 2000/01/16 20:47:12 $
  7.  * $Revision: 1.2 $
  8.  *
  9.  * (C) 1999 by Hyperion Software
  10.  * All rights reserved
  11.  *
  12.  * This file is part of the MiniGL library project
  13.  * See the file Licence.txt for more details
  14.  *
  15.  */
  16.  
  17. #ifndef __LOG_H
  18. #define __LOG_H
  19.  
  20. /*
  21. ** It is probably difficult to support logging of gl calls on other compilers,
  22. ** since the egcs/gcc preprocessor supports variable argument macros, and
  23. ** I am using it :)
  24. */
  25.  
  26. #ifdef NLOGGING
  27. #define LOG(level, func, format, args...)
  28. #else
  29. #ifdef __PPC__
  30. extern int MGLDebugLevel;
  31. #define LOG(level, func, format, args...) \
  32.     if (MGLDebugLevel >= level)            \
  33.     {                                       \
  34.         kprintf("[MiniGL::%s] ", #func);     \
  35.         kprintf(format , ## args );           \
  36.         kprintf("\n");                         \
  37.     }
  38. #else
  39. extern int MGLDebugLevel;
  40. #define LOG(level, func, format, args...) \
  41.     if (MGLDebugLevel >= level)            \
  42.     {                                       \
  43.         mykprintf("[MiniGL::%s] ", #func);   \
  44.         mykprintf(format , ## args );         \
  45.         mykprintf("\n");                       \
  46.     }
  47. #endif
  48.  
  49. #endif
  50.  
  51.  
  52. #endif
  53.